package com.luban.springboot.task;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Configuration
@Component
@EnableScheduling
public class LuBanTask {
	
	@Scheduled(cron = "0/5 * * * * ?")
	private void taskOne() {
		System.out.println("LuBanTask.taskOne()+我是每五秒执行一次的");
	}
	
	@Scheduled(cron = "0/60 * * * * ?")
	private void taskTwo() {
		System.out.println("LuBanTask.taskOne()+我是每隔一分钟执行一次的");
	}

}
